{* Include CSS *}

{* include js *}
<script type="text/javascript" src="{$smarty.const.URL_FULL}modules/surveymodule/js/Survey_Edit.js"></script>

<div class="popular">
	<div class="header">
		<h2>{if $is_edit == 1}{$_TR.survey_edit_title}{$survey->name}{else}{$_TR.survey_add_title}{/if}</h2>
	</div>
	<div class="contents">
		{form name=survey_edit action=survey_save}
		<div class="form_header">
			<p>{$_TR.survey_edit_form_header}</p>
		</div>
		{include file="`$smarty.const.BASE`modules/surveymodule/views/_Survey_Questions_Editor.tpl"}
		{* Control *}
		{control type=text name=name label=$_TR.survey_name size=42 required=1 class="required" value=$survey->name}
		{control type=dropdown name=cat_id label=$_TR.survey_cat_name  required=1 items=$cat_dropdown_array value=$survey->cat_id}
		{control type=dropdown name=is_active label=$_TR.survey_is_active  required=1 items=$isactive_dropdown value=$survey->is_active}
		{control type=textarea name=description label=$_TR.survey_description  required=1 value=$survey->description cols=76 rows=5}
		{control type=editor name=first_text label=$_TR.survey_first_text  required=1 value=$survey->first_text}
		<div id="time_startControl" class="text control ">
			<label style="float:left;">
				<span class="label">{$_TR.survey_time_start}</span>
				<input type="text" id="time_start" name="time_start" value="{$survey->time_start}" size="42" class="easyui-datetimebox ">
			</label>
			<label style="float:left; margin-left: 40px; padding-left: 40px; border-left: 1px solid #CCCCCC;">
				<span class="label">{$_TR.survey_time_end}</span>
				<input type="text" id="time_end" name="time_end" value="{$survey->time_end}" size="42" class="easyui-datetimebox ">
			</label>
		</div>
		<div class="clear"></div><br>
		{* Questions editor *}
		 
		{* End Questions Editor *}
		<div id="submitControl" class="control buttongroup">
			<input id="submitSubmit" class="button" type="submit" value="{$_TR.survey_edit_savebutton}">
		</div>
		{/form}
	</div>
</div>



